home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
bbs
/
pad321.zip
/
CHECKNUM.MEX
< prev
next >
Wrap
Text File
|
1996-08-21
|
838b
|
41 lines
#ifndef __MAX_MH
#include <max.mh>
#define __MAX_MH
#endif
#include "checknum.mh"
#include "hacks.mh"
int main () {
string: phoneNum, token, params, newPhone, prettyPhone;
int: dialType, fd;
if (fileexists (phoneTempFile) = False) return 0;
fd := open (phoneTempFile, IOPEN_READ);
readln (fd, newPhone);
readln (fd, prettyPhone);
close (fd);
phoneNum := newPhone;
stripNonNumeric (phoneNum);
dialType := checkPhone (phoneNum);
if ((dialType = DNLD) or (dialType = DNLOCAL)) {
fd := open (checkNumTempFile, IOPEN_WRITE | IOPEN_CREATE);
writeln (fd,itostr (dialType));
writeln (fd,phone_number);
writeln (fd,prettyPhone);
writeln (fd,city);
close (fd);
}
else {
show_file (fail_file);
};
remove (phoneTempFile);
return 0;
}